#include "ne_ds.h"
#include "openManipulatorTrajectoryPlanning_6a081443_3_ds_sys_struct.h"
#include "openManipulatorTrajectoryPlanning_6a081443_3_ds_duf.h"
#include "openManipulatorTrajectoryPlanning_6a081443_3_ds.h"
#include "openManipulatorTrajectoryPlanning_6a081443_3_ds_externals.h"
#include "openManipulatorTrajectoryPlanning_6a081443_3_ds_external_struct.h"
#include "ssc_ml_fun.h"
int32_T openManipulatorTrajectoryPlanning_6a081443_3_ds_duf ( const
NeDynamicSystem * sys , const NeDynamicSystemInput * t4 , NeDsMethodOutput *
t5 ) { PmRealVector out ; real_T U_idx_0 ; real_T X_idx_0 ; real_T
intermediate_der0 ; real_T intermediate_der2 ; real_T intrm_sf_mf_0 ; real_T
t2 ; U_idx_0 = t4 -> mU . mX [ 0 ] ; X_idx_0 = t4 -> mX . mX [ 0 ] ; out = t5
-> mDUF ; intrm_sf_mf_0 = ( X_idx_0 - 0.0125 ) * 10000.0 + U_idx_0 * 150.0 ;
U_idx_0 = ( X_idx_0 - - 0.01 ) * 10000.0 + U_idx_0 * 150.0 ;
intermediate_der0 = ( X_idx_0 - 0.0125 ) / 0.0001 ; t2 = intermediate_der0 *
intermediate_der0 * 3.0 - intermediate_der0 * intermediate_der0 *
intermediate_der0 * 2.0 ; intermediate_der0 = ( - 0.01 - X_idx_0 ) / 0.0001 ;
intermediate_der2 = 150.0 ; if ( X_idx_0 >= 0.0126 ) { intermediate_der0 = -
( ( real_T ) ( intrm_sf_mf_0 >= 0.0 ) * intermediate_der2 ) ; } else if (
X_idx_0 >= 0.0125 ) { intermediate_der0 = - ( ( real_T ) ( intrm_sf_mf_0 >=
0.0 ) * intermediate_der2 * t2 ) ; } else if ( X_idx_0 > - 0.01 ) {
intermediate_der0 = 0.0 ; } else if ( X_idx_0 > - 0.0101 ) {
intermediate_der0 = - ( ( real_T ) ( U_idx_0 <= 0.0 ) * intermediate_der2 * (
intermediate_der0 * intermediate_der0 * 3.0 - intermediate_der0 *
intermediate_der0 * intermediate_der0 * 2.0 ) ) ; } else { intermediate_der0
= - ( ( real_T ) ( U_idx_0 <= 0.0 ) * intermediate_der2 ) ; } out . mX [ 0 ]
= intermediate_der0 ; ( void ) sys ; ( void ) t5 ; return 0 ; }
